#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;

vector<long long> a;
bool cmp(long long a, long long b)
{
    return a < b;
}
int main()
{
    long long N, temp;
    cin >> N;
    for (long long i = 0; i < N * 2; i++)
    {
        cin >> temp;
        a.push_back(temp);
    }
    sort(a.begin(), a.end());
    int z = 0;
    z = (a[2 * (N / 2)] + a[2 * (N / 2) + 1]) / 2;
    cout << z;
}